Design SuiteEditing object connections

Command

Path

Edit Object Connection

Tools > Database

The read/write queries of an object connection can be viewed and edited for one or several selected objects.

To edit object connections:

Select one or more objects. The objects should already be connected to a database.

Select the command.

The Edit Object Connection dialog box opens. The reading and writing SQL queries for the selected object(s) display and can be edited, either individually for each selected object, or for all the objects at once.

The formatting of the queries depends on the database in use. Some databases expect brackets, while others use quotes. The ODBCDrivers.xml file, located in the [Vectorworks]\Plug-ins\Common\Data folder, indicates the proper formatting to use for various drivers.

Edit_Obj_Connection.png 

Click to show/hide the parameters.Click to show/hide the parameters.

Parameter

Description

Available Records

Lists the record formats available for the selected objects (when multiple objects are selected, only record formats that are common to the selected objects display)

Modify selected objects individually

Edits the reading and writing SQL queries of each selected object individually, by scrolling through each one

Modify selected objects in bulk

Edits the reading and writing SQL queries of all the selected objects at one time using record name identifiers; scrolling through the selected objects is not necessary

Reading Query

Shows the reading SQL query for the selected object(s)

Protocol

Reading SQL queries consist of the following rows:

SELECT: indicates the column names

Example: [id],[room name],[area]

FROM: indicates the name of the database and table

Example: [SpaceInfo].[dbo].[Spaces]

WHERE: indicates the name and value of the record format, with the record format name and the value (or identifier in angle brackets) separated by an equal sign

Example: [area]=30 or [area]=<area>

When editing a single query that applies to multiple selected objects (Modify selected objects in bulk is selected), use an identifier within angle brackets for the WHERE record field name, instead of the actual value. Using an identifier in angle brackets allows the query to proceed for all selected objects regardless of each object’s actual value. When the query is executed, the Vectorworks program replaces the field name in angle brackets with the value from the record.

Test Query

Tests the current reading SQL query to see if it is valid; this is useful for verifying queries before committing to the changes. An alert indicates whether the test query was successful or invalid.

Reset

If the reading SQL query has been modified, returns the query to its original settings

Writing Query

Shows the writing SQL query for the selected object(s)

Protocol

Writing SQL queries consist of the following rows:

UPDATE: indicates the name of the database and table

Example: [SpaceInfo].[dbo].[Spaces]

SET: indicates the name and value of the table column, with the column name and the value (or record format field name in angle brackets) separated by an equal sign

Example: [Room Name]=Kitchen or [Room Name]=<name>

WHERE: indicates the name and value of a search condition, such as column name and value, with the search item name and the value (or record format field name in angle brackets) separated by an equal sign

Example: [id]=1 or [id]=<identifier>

When editing a single query that applies to multiple selected objects (Modify selected objects in bulk is selected), use a record format field name within angle brackets for the SET and/or WHERE value, instead of the actual value. Using a record format field name in angle brackets allows the query to proceed for all selected objects regardless of each object’s actual value. When the query is executed, the Vectorworks program replaces the field name in angle brackets with the value from the record.

Test Query

Tests the current writing SQL query to see if it is valid; this is useful for verifying queries before committing to the changes. An alert indicates whether the test query was successful or invalid.

Reset

If the writing SQL query has been modified, returns the query to its original settings

< or >

When multiple objects are selected with the Modify selected objects individually option enabled, scrolls among the objects to display each object’s queries for editing

Show Object

Displays the current object in the drawing window for identification

If there are validation problems, an error message provides information. The cursor is automatically placed in the field where the problem exists to help identify the problem.

Single object connection

Multiple object connection

Removing object connections

Database setup

Database connection

Record format database connection

Specifying update settings

Concept: Records, reports, and schedules

Database-Vectorworks communication

 

Was this page helpful?